using System;

class MathExpression
{
    static void Main(string[] args)
    {
		long n = long.Parse(Console.ReadLine());
		long[] numbers = new long[n];
		for(int i=0;i<numbers.Length;i++)
		{
			 numbers[i] = long.Parse(Console.ReadLine());
		}
		long mask = 0;
		foreach(long number in numbers)
		{
			//object binary =	Convert.ToString(number, 2).PadLeft(32, '0');
			//Console.WriteLine(binary+" - number: " + number);
			
			mask ^= number; // XOR ^ > 0 i 1 = 1, 0 i 0 = 0 , 1 i 1 = 0 => se izpolzva za otkrivane na nechetni chisla
			//object binary1 =	Convert.ToString(mask, 2).PadLeft(32, '0');
			//Console.WriteLine(binary1+" - mask: " + mask);
		}
		Console.WriteLine(mask);
	}
}